home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000118_icon-group-sender _Thu Dec 10 09:06:07 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id JAA06264
for icon-group-addresses; Thu, 10 Dec 1998 09:04:38 -0700 (MST)
Message-Id: <199812101604.JAA06264@baskerville.CS.Arizona.EDU>
From: swampler@noao.edu (Steve Wampler)
Date: Tue, 8 Dec 1998 18:22:21 MST
To: icon-group@optima.CS.Arizona.EDU
Subject: Re: Past Keyword / Coexpr Help
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
On Dec 8 at 5:23pm, MJE writes:
} Steve Wampler wrote:
} >
} > ... You still
} > have the overhead of procedure calling - there is no difference in the
} > call to a user-supplied procedure and a built-in.
}
} The logical requirements are identical but I'm sure you'll grant that C
} overhead happens much faster than Icon interpreted overhead.
Well, yes and no. It's the interpreter making the call in both cases,
so argument pushing, stack adjustments, etc. are the same. Only after
the call stack has been set up does a difference appear and that's
not much more than setting the program counter. Once you're in the
C routine, things will go faster, but there are still all the type
checks and type coercions that take place, plus the decomposition
of Icon types into C types and back. All of these happen in either
case. The amount of work done differently (i.e. in C instead of
Icon) isn't that large of a percentage of the total work being done.
Don't be surprised if there isn't that much difference - the
'heart' of the code (find()) is coded in C either way. Still, it
would make a good experiment and I'll certainly grant that if you
implemented find() in Icon versus calling the C you'd see a
difference.
} I like your idea about an IPL pack. However, you have not incited me to
} commit an act of implementation. What interests me instead is making
} Icon parsing available in C language programs.
} For that I will need to write a bunch of COM objects. That means
} "Component Object Model" for those not in the know, Microsoft's upgrade
} to the DLL concept. I have been mulling over this project for a while.
} A little more mulling, and I might be incited to commit an act of
} implementation.
That will be interesting and certainly useful for those of you running
under Windows, but not much use to those of us who live in the non-MS
world.
One thing to keep in mind is that in many Icon programs, the
time spent in the interpreter is <10% of the total running time - most
of the time is actually spent in C code. We learned that when Cary
Coutant wrote a compiler for Icon back in the 70's - the speed up
wasn't spectacular. It took Ken Walker's optimizing compiler work
to show any significant improvement and even with that there was
still a lot of work to be done.
--
Steve Wampler - swampler@gemini.edu [Gemini 8m Telescopes Project (under AURA)]
The gods that smiled at your birth are now laughing openly. (Fortune Cookie)